package com.jiexin.param;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.xml.ws.ServiceMode;

@Getter
@Setter
@ToString
public class DescriptionParam {

    private Integer id;

    @NotBlank(message = "物料类型不可以为空")
    @Length(min = 0, max = 40, message = "物料类型长度需要40个字符以内")
    private String itemType;

    @NotBlank(message = "属性名称不可以为空")
    @Length(min = 0, max = 20, message = "属性名称长度需要在20个字符以内")
    private String attrName;

    @NotNull(message = "属性ID不能为空")
    private Integer attrId;

    @NotNull(message = "顺序不能为空")
    private Integer seq;

    @NotNull(message = "必须指定状态")
    @Min(value = 0, message = "状态不合法")
    @Max(value = 1, message = "状态不合法")
    private Integer status;

    @Length(min = 0, max = 20, message = "备注长度需要在200个字符以内")
    private String remark;
}
